﻿
@{
    Layout = null;
}
@using Company.Model
<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>Index</title>
</head>
<body>
    <div>
        <h1>简单的画一个表格展示数据</h1>
        <table border="1" cellpadding="0" cellspacing="0">

            <tr>

                <th>ID</th>

                <th>姓名</th>

                <th>年龄</th>

                <th>性别</th>

            </tr>
            @foreach (Staff staff in Model)
            {
                <tr>
                    <td> @staff.Id </td >
                    <td> @staff.Name </td >
                    <td> @staff.Age </td >
                    <td> @staff.Sex </td >
                </tr>
            }

        </table>
        <hr />
        <h1>增加</h1>
        <form action="@Url.Action("Add", "Home")" method="POST">
            姓名:<input name="Name" />
            年龄:<input name="Age" />
            性别:<input name="Sex" />
            <button type="submit">提交</button>

        </form>
        <hr />
        <h1>修改</h1>
        <form action="@Url.Action("update", "Home")" method="POST">
            Id:<input name="Id" />
            姓名:<input name="Name" />
            年龄:<input name="Age" />
            性别:<input name="Sex" />
            <button type="submit">提交</button>

        </form>
        <hr />
        <h1>删除</h1>
        <form action="@Url.Action("Delete", "Home")" method="POST">
            Id:<input name="Id" />
            <button type="submit">提交</button>

        </form>

    </div>
</body>
</html>
